<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>3CSS常用值</title>
    <style>
        h1{
            color: red;
            color: rgb(255,0,0);
            color: rgb(0,255,0);
            color: rgb(0,0,255);
            color: #ff0000;
            color: #00ff00;
            color: #0000ff;
            color: #0f0;
            color: #000000;
            color: #ffffff;
            color: rgba(255,0,0,0.5);
            color: rgba(0,0,255,0.3);
        }
        .d1{
            /*插入背景图*/
            background-image: url("img/mr.png");
            /*注意:背景图必须设置所在区域大小*/
            width: 50px;
            height: 100px;
            /*修改背景图的尺寸 50px 100px*/
            background-size: 50px 100px;
            /*可以*/
            background-color: cyan;
        }
        .d2{
            width: 300px;
            height: 300px;
            border:5px solid #ff0000;
            background-image: url("img/mr.png");
            background-repeat: no-repeat;
            /*背景图的位置 水平 垂直 0,0表示原点(左下角) 右,下是正方向*/
            background-position: 0 0;
            background-position: -50px 0;
            background-position: 0 -50px;
            background-position: 50px -50px;
            background-position: 50% 50%;
            background-position:center;
            background-position: 100% 100%;
        }
        .d4{
            width: 611px;
            height: 376px;
            background-color:#e8e8e8;
            border:3px solid #ff0000;
            background-image: url("img/computer1.png");
            background-repeat: no-repeat;
            background-size: 318px 319px;
            background-position: 90% 60%;
        }
    </style>
</head>
<body>
<h1>测试颜色</h1>
<div class="d1"></div>
<div class="d2"></div>
<div class="d4"></div>
<div class="d3">
    <div class="text"></div>
    <h1>我是标题</h1>
</div>
</body>
</html>